package yycore
import chisel3._
import common.Constants._
import common.Instructions._

object Priviledged {
  val table = Array(
    FENCE   -> List(Y, BRType.none, OP1_X, OP2_X, OEN_0, OEN_0, FuType.mou, MOUOpType.fence, WB_X, REN_0),
    FENCE_I -> List(Y, BRType.none, OP1_X, OP2_X, OEN_0, OEN_0, FuType.mou, MOUOpType.fencei, WB_X, REN_0),

    ECALL   -> List(Y, BRType.none, OP1_X, OP2_X, OEN_0, OEN_0, FuType.csr, CSROpType.I, WB_X, REN_0),
    EBREAK  -> List(Y, BRType.none, OP1_X, OP2_X, OEN_0, OEN_0, FuType.csr, CSROpType.I, WB_X, REN_0),
    MRET    -> List(Y, BRType.none, OP1_X, OP2_X, OEN_0, OEN_0, FuType.csr, CSROpType.I, WB_X, REN_0),
    DRET    -> List(Y, BRType.none, OP1_X, OP2_X, OEN_0, OEN_0, FuType.csr, CSROpType.I, WB_X, REN_0)
  )
}
